<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>好彩头彩票后台管理系统</title>
  <link href="${rc.contextPath}/css/table.css" rel="stylesheet"type="text/css" />
</head>

<body>

<div class="officeTableHead">查询条件:</div>
<form action="${rc.contextPath}/UserController.do?method=getAllUser" id="searchUserForm" name="searchUserForm" method="post">
<table class="myOfficeTable">
  <tr class="even">
    <td width="5%">账户名:</td>
    <td width="15%">
      #springBind( "user.accounts" )
      <input type="text" name="${status.expression}" value="$!{status.value}" />
    </td>
    <td width="5%">身份证号码:</td>
    <td width="30%">
      #springBind( "user.iDCardNumber" )
      <input type="text" name="${status.expression}" value="$!{status.value}" onkeypress="onlyNum();" />
    </td>
  </tr>
  <tr class="even">
    <td width="5%">姓名:</td>
    <td width="15%">
      #springBind( "user.userName" )
      <input type="text" name="${status.expression}" value="$!{status.value}" />
    </td>
    <td>地址:</td>
    <td>
      #springBind("user.address")
      <input type="text" name="${status.expression}" value="$!{status.value}" /></td>
  </tr>
  <tr class="even">
    <td>昵称:</td>
    <td>
      #springBind( "user.nickName" )
      <input type="text" name="${status.expression}" value="$!{status.value}" />
    </td>
    <td>虚拟币:</td>
    <td>
      #springBind( "user.minVMoneySum" )
      <input type="text" name="${status.expression}" value="$!{status.value}" onkeydown="enterFocus()" onkeyup="onlyNum()" />--
      #springBind( "user.maxVMoneySum" )
      <input type="text" name="${status.expression}" value="$!{status.value}" onkeydown="enterFocus()" onkeyup="onlyNum()" />
    </td>
  </tr>
  <tr class="even">
    <td width="5%">银行帐号:</td>
    <td width="15%">
      #springBind( "user.bankCard" )
      <input type="text" name="${status.expression}" value="$!{status.value}" onkeypress="onlyNum();"/>
    </td>
    <td>注册时间：</td>
    <td colspan="3">
      #springBind( "user.lessDate" )
      <input id="lessDate" name="${status.expression}" class="Wdate" value="$!{status.value}" type="text"/>至
      #springBind( "user.maxDate" )
      <input id="maxDate" name="${status.expression}" class="Wdate" value="$!{status.value}" type="text"/>
    </td>
  </tr>
  <tr class="even">
    <td>用户来源：</td>
    <td>
      <select id="sourceID" name="sourceID" style="width:120px;">
        <option value="">请选择</option>
        #foreach($userRootin in $!userRootinList)
        <option value="$!userRootin.rootinID" #if ($!user.sourceID == $!userRootin.rootinID) selected #end>$!userRootin.rootinName</option>
        #end
      </select>
    </td>
  </tr>
  <tr class="odd">
    <td colspan="2"></td>
    <td colspan="4" align="right">
      <input class="officeInput" type="button" id="search" name="search" value=" 查询 " />
      <input class="officeInput" type="reset" value=" 重置 " />
    </td>
  </tr>
</table>
</form>

<div class="officeTableHead">彩民列表:</div>
<form action="${rc.contextPath}/UserController.do?method=getAllUser" id="saveUserForm" name="saveUserForm" method="post">
<table class="myOfficeTable">
  <tr class="thHeader">
    <td>
      <input type="checkbox" name="sites1del" id="sites1del" />
    </td>
    <td width="120" >账户名</td>
    <td width="120" >昵称</td>
    <td width="110" >真实姓名</td>
    <td width="240" >所属地市县</td>
    <td width="80" >用户来源</td>
    <td width="159" >注册时间</td>
    <td width="159" >最后访问时间</td>
    <td width="110" >最后访问IP</td>
    <td width="90" >冻结状态</td>
  </tr>
  #set($ri=0) 
  #foreach( $lal in $page.dataList ) 
  #if($ri==0) #set($ri=1)
  <tr class="odd" onmouseover="this.className='highlight'" onmouseout="this.className='odd'">
  #else #set($ri=0)
  <tr class="even" onmouseover="this.className='highlight'" onmouseout="this.className='even'">
  #end
    <td>
      <input type="hidden" name="sites2del1" value="$!userGroup.userGroupID" />
      <input type="checkbox" id="sites2del" name="sites2del" value="$!lal.userID" />
    </td>
    <td>$!{lal.accounts}</td>
    <td>$!{lal.nickName}</td>
    <td>
      <a href="${rc.contextPath}/UserController.do?method=getUserInfo&userID=$!{lal.userID} ">$!{lal.userName}</a>
    </td>
    <td>$!{lal.areaID}</td>
    <td>$!{lal.rootinName}</td>
    <td>$dateTool.format('yyyy-MM-dd HH:mm:ss', $!lal.logCreateTime)</td>
    <td>$dateTool.format('yyyy-MM-dd HH:mm:ss', $!lal.lastVistTime)</td>
    <td>$!lal.lastVisitIP</td>
    <td>
      #if("$!lal.userStateID"==0)未冻结 #elseif("$!lal.userStateID"==1)
      <font color="red">已冻结</font>
      #end
    </td>
  </tr>
  #end
</table>
<table class=myOfficeTable>
  <tr>
    <td>将以上所选用户加入
      <select name="userGroupID" class='officeInput'>
        <option value="">请选择</option>
        #foreach ($!userGroup in $userGroupList )
        <option value="$!userGroup.userGroupID" #if ("$!userGroupID"== "$!userGroup.userGroupID") selected #end>$!userGroup.userGroupName</option>
        #end
      </select>组中
      <input type="button" value=" 保存 " class="officeInput" onClick="checkValues1(form2)" />
      <input type="checkbox" name="saveAll" />保存所有
    </td>
  </tr>
</table>
</form>

<form action="${rc.contextPath}/UserController.do?method=getAllUser" id="userForm" name="userForm" method="post">
#springBind( "user.curPage" )
<input type="hidden" name="${status.expression}" id="user.curPage" value="$!{status.value}" />
#springBind( "user.accounts" )
<input type="hidden" name="${status.expression}" value="$!{status.value}" />
#springBind( "user.iDCardNumber" )
<input type="hidden" name="${status.expression}" value="$!{status.value}" />
#springBind( "user.userName" )
<input type="hidden" name="${status.expression}" value="$!{status.value}" />
#springBind("user.address")
<input type="hidden" name="${status.expression}" value="$!{status.value}" />
#springBind( "user.nickName" )
<input type="hidden" name="${status.expression}" value="$!{status.value}" />
#springBind( "user.minVMoneySum" )
<input type="hidden" name="${status.expression}" value="$!{status.value}" />
#springBind( "user.maxVMoneySum" )
<input type="hidden" name="${status.expression}" value="$!{status.value}" />
#springBind( "user.bankCard" )
<input type="hidden" name="${status.expression}" value="$!{status.value}"/>
#springBind( "user.lessDate" )
<input name="${status.expression}" value="$!{status.value}" type="hidden"/>
#springBind( "user.maxDate" )
<input name="${status.expression}" value="$!{status.value}" type="hidden"/>
<div>
#paginationWithParam("document.userForm", $page, "user.curPage")
</div>
</form>

</body>
</html>

<script type="text/javascript" src="${rc.contextPath}/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${rc.contextPath}/js/checkbox.js"></script>
<script type="text/javascript">
<!--
    (function() {
        document.getElementById("lessDate").onfocus = function() {
            var maxDate=$dp.$('maxDate');
            WdatePicker({
                onpicked:function(){
                    maxDate.focus();
            },
            maxDate:'#F{$dp.$D(\'maxDate\')}'
            });
        }
        document.getElementById("maxDate").onfocus = function() {
            WdatePicker({
                minDate:'#F{$dp.$D(\'lessDate\')}'
            })
        }
        document.getElementById("search").onclick = function() {
            document.searchUserForm.submit();
        }
        document.getElementById("sites1del").onclick = function() {
            selectAllChkbox(this, 'sites2del');
        }
        //jsSelectIsItem(document.getElementById("sourceID"), "$!user.sourceID")
    })();

    function jsSelectIsItem(objSelect, objItemValue) {
        for (var i = 0; i < objSelect.options.length; i++) {
            if (objSelect.options[i].value == objItemValue) {
                objSelect.options[i].selected = true;
                return;
            }
        }
    }
//-->
</script>
